<%-- 
    Document   : w_product
    Created on : Sep 22, 2013, 3:11:55 PM
    Author     : Trang
--%>

<%@page import="model.Role"%>
<%@page import="model.Staff"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<%
    Staff staff = (Staff) session.getAttribute("staff");

    if (staff == null) {
        response.sendRedirect(request.getContextPath() + "/Administration");
    }  else {
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Issue Note</title>
         <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
         <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
          <link href="<%= request.getContextPath()%>/css/style_for_warehousing.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/style_for_page.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/style_for_menu.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/style_addtion.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/adMenu.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/tHeaderFooter.css" rel="stylesheet" type="text/css"/>

    </head>
    <body style="background-color: lightsteelblue;">
        <script>
        </script>
        <% int i = 0;%>
        <header>
            <div class="header"> 
                <%@include file="/include/mHeader.jsp" %>
            </div>
            <div class="adContent">
                <div class="adMenu">
                    <%@include file="/include/mMenu.jsp" %>
                </div>
            </div>
        </header>
                <div class="divcontent">  
              <div class="headButton">
                <div style="width: 1024px; float:left;margin:auto;">
                    <br>
                    <h2>Customer Information</h2>
                    <img src="<%= request.getContextPath()%>/css/Paint1.png" alt="header Banner" width="1024" height="5"  title="Go to Adminitration Homepage">
                </div>
                <div id="secondLine2">
                    <div id="sl12">
                        <s:form action="searchProduct" namespace="/">     
                            <s:textfield label="Input keyword to search" cssStyle="margin-left:-12px;" name="keyword" size="30" theme="simple" />
                            <s:submit value="Search" cssStyle="width: 100px; margin-left: 12px; background-color: gray;" theme="simple" title="Quick Search"/>
                        </s:form>
                    </div> 
                    <div id="sl12">
                        <s:select name="sort" label="Sort by" cssStyle="width: 200px" list="{'First Name', 'Last Name', 'Address', 'DOB'}" />
                    </div>
                    <div id="sl12">
                        <s:form namespace="/Administration/Receipt" action="add-receipt" >
                            <s:submit value="New Issuing"  cssStyle="width: 100px; margin-left: 12px;background-color: gray;" theme="simple" title="New Customer"/>
                        </s:form>
                    </div>
                </div>
            </div>                
            <div class="content">

                <div class="datagrid">
                    <table>
                        <thead>
                            <tr>
                                <th> No </th> 
                                <th>Receipt ID</th>
                                <th>Total Quantity</th>
                                <th>Total Amount</th>
                                <th>Create Date</th>
                                <th></th>
                                <th></th>
                            </tr>
                        </thead>  
                    <tbody>

                    <form name="fom" method="post"> 

                        <s:iterator value="receips">
                            <% i++;%>
                            <tr>
                                <td><%out.print(i);%></td>
                                <td><s:property value="idReceipt"/></td>
                                <td><s:property value="totalQuantity"/></td>
                                <td><s:property value="getText('{0,number,#,##0.00}',{totalAmount})"/></td>

                                <td><s:property value="createTime"/></td>      

                                <td><a href="<%= request.getContextPath()%>/Administration/Receipt/edit-receip/<s:property value='idProduct'/>" title="<s:property value='description'/>">
                                        <img src="<%= request.getContextPath()%>/image/Edit.gif" alt="edit product" width="20" height="auto" title="Eidt Product"/>
                                </td>  
                                <td>
                                    <a href="<%= request.getContextPath()%>/Administration/Receipt/delete-receipt/<s:property value='idProduct'/>" title="<s:property value='description'/>">
                                     <img src="<%= request.getContextPath()%>/image/Delete.gif" alt="delete product" width="20" height="auto" title="Delete Product"/>  
                                </td>                
                            </tr>       
                        </s:iterator>
                    </form>
                    </tbody>
                </table>
                </div> 
            </div>
                </div>
    <footer>
        <div id="footer">
            <%@include file="/include/iFooter.jsp" %>
        </div>    
    </footer>
</body>
</html>
<%
    }
%>